package com.gdcvi.scan;

/**
 *客户端和服务端猜拳，启动时先启动服务端
 */
public class TestClient {
    public static void main(String[] args) throws Exception {
        Hand.MAX_CODE=4;
        HandConnection connection=new GameClient(10086);
        Player player1 = new Person();
        Player player2 = new RemotePlayer(connection);
        player1.setName("张三");
        player2.setName("李四");
        player1 =new 发送器(new 出拳校验器(new InputReminderNO2(player1)),connection);
        player2 = new OutputReminder(player2);

        Hand hand1  =  player1.chuQuan();
        Hand hand2  =  player2.chuQuan();
        int result = hand1.equals(hand2);
        System.out.println(result);
        connection.close();
        测试.test(result,player1,player2);
    }
}
